package com.example.generator.controller;

import com.example.common.response.R;
import com.example.generator.domain.Gen;
import com.example.generator.service.GenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value = "代码生成器", tags = {"代码生成器"})
@RequestMapping(value = "/gen", method = {RequestMethod.POST, RequestMethod.GET})
public class GenController {
    @Autowired
    private GenService genService;

    @ResponseBody
    @ApiOperation("获取列表")
    @RequestMapping("/getList")
    public R<List<Gen>> index() {
        return genService.getList();
    }
}
